package com.wk.dao;

import com.wk.vo.Comment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentDao {
    Integer selectUserId(@Param("bookId") int bookId, @Param("userId") int userId);

    String selectComment(@Param("bookId") int bookId, @Param("userId") int userId);

    String selectLast(@Param("bookId") int bookId, @Param("userId") int userId);

    void insertComment(@Param("bookId") int bookId, @Param("userId") int userId, @Param("comment") String comment);

    void updateComment(@Param("bookId") int bookId, @Param("userId") int userId, @Param("comment") String comment);

    void insertAcquaintance(@Param("bookId") int bookId, @Param("userId") int userId, @Param("acquaintance") String acquaintance);

    void updateAcquaintance(@Param("bookId") int bookId, @Param("userId") int userId, @Param("acquaintance") String acquaintance);

    void insertLastInfo(@Param("bookId") int bookId, @Param("userId") int userId, @Param("lastTime") String lastTime, @Param("lastLocation") int lastLocation);

    void updateLastInfo(@Param("bookId") int bookId, @Param("userId") int userId, @Param("lastTime") String lastTime, @Param("lastLocation") int lastLocation);

    List<Comment> getAllComments(@Param("bookId") int bookId);
}
